package cn.jobstart.searchExt;

import cn.jobstart.model.Company;
import cn.jobstart.model.CompanyJob;
import cn.jobstart.model.Job;
import cn.jobstart.search.CompanyJobSearch;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;


/**
 * @author sunke
 * @Date 2023-09-06 15:00:20
 * @description CompanyJobSearchExt      企业职位
 */
@Data
@Accessors(chain = true)
@ApiModel("企业职位CompanyJobSearchExt")
public class CompanyJobSearchExt extends CompanyJobSearch<CompanyJobSearchExt> {


    private String jobNameLike;
    private String companyNameLike;
    private List workCityList;
    private List jobIds;

    public static CompanyJobSearchExt getInstance() {
        return new CompanyJobSearchExt();
    }

    public void setJobNameLike(String jobNameLike) {
        this.jobNameLike = jobNameLike;
        setLikeField(Job.NAME, jobNameLike);
    }

    public CompanyJobSearchExt setWorkCityList(List workCityList) {
        this.workCityList = workCityList;
        setInField(CompanyJob.WORK_CITY, workCityList);
        return this;
    }

    public CompanyJobSearchExt setJobIds(List jobIds) {
        this.jobIds = jobIds;
        setInField(CompanyJob.JOB_ID, jobIds);
        return this;
    }

    public CompanyJobSearchExt setCompanyNameLike(String companyNameLike) {
        this.companyNameLike = companyNameLike;
        setLikeField(Company.NAME, companyNameLike);
        return this;
    }

    @Override
    public CompanyJobSearchExt getSubThis() {
        return this;
    }

}

